package eu.webhib.extgui.controller.intf;

import eu.webhib.extgui.data.intf.DataItem;

/**
 * Data navigation interface for the data items a TreeController displays in the view.
 * Provides the needed application data to a tree controller:
 * root node, child and parent navigation functions
 */
public interface TreeDataProvider extends ListDataProvider {

   /**
    * Retrieve the root data item to display in the tree view
    */
   DataItem getRoot();

   /**
    * Move the node to a new parent
    * @param nodeToMove the node to be moved
    * @param newViewParent new new parent
    * @return whether move operation was valid
    */
   boolean moveTo(DataItem nodeToMove, DataItem newViewParent);
}
